package com.north.light.libpermission.impl;

import com.north.light.libpermission.PermissionType;
import com.north.light.libpermission.api.PermissionImplApi;

import java.io.Serializable;

/**
 * FileName: PermissionFactory
 * Author: lzt
 * Date: 2022/8/22 10:10
 * 权限工厂
 */
public class PermissionFactory implements Serializable {

    public static PermissionImplApi create(PermissionType permissionType) {
        PermissionImplApi implApi;
        switch (permissionType) {
            case TYPE_PERMISSION_XX:
                implApi = new XXPermission();
                break;
            default:
                implApi = new XXPermission();
                break;
        }
        return implApi;
    }
}
